package com.hunk.core.excel;

import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;

/** Poi解析基本方法接口
 * @author Dengyx
 * @param <T>
 */
public interface PoiCallback<T> {
	/**定义对每一行进行具体解析
	 * @param hssfRow
	 * @param hssfWorkBook
	 * @param hssfSheet
	 * @return
	 */
	public abstract T parse(HSSFRow hssfRow, HSSFWorkbook hssfWorkBook, HSSFSheet hssfSheet);
	/**返回解析的文件路径
	 * @return
	 */
	public abstract String getPath();
	
	/**配合ExcelUtil可以检查workbook中定义的版本信息
	 * @param hssfWorkbook
	 * @throws VersionInCorrectException
	 */
	public abstract void check(HSSFWorkbook hssfWorkbook) throws VersionInCorrectException;
}
